import request from '@/utils/request'
// 研发申请查询
export function selectRes() {
  return request({
    url: '/selectRes',
    method: 'get',
  })
}

// 研发计划查询
export function selectplan() {
  return request({
    url: '/selectPlan',
    method: 'get',
  })
}
// 研发申请查询
export function selectOfficial() {
  return request({
    url: '/selectOfficial',
    method: 'get',
  })
}
// 分页，条数，查询
export function requestFormInquiry(research) {
  return request({
    url: '/requestFormInquiry',
    method: 'get',
    params: research
  })
}

// 申请研发
export function addresearch(addresearch2) {
  return request({
    url: '/addresearch',
    method: 'post',
    params: addresearch2
  })
}
// 添加研发计划
export function addplan(addresearch2) {
  return request({
    url: '/addplan',
    method: 'post',
    params: addresearch2
  })
}

// 删除申请
export function deleteres(researchId) {
  return request({
    url: '/deleteres',
    method: 'post',
    params:researchId

  })
}

// 修改申请表
export function updateres(form) {
  return request({
    url: '/updateres',
    method: 'post',
    params:form

  })
}
// 添加计划
export function addcontent(addplan) {
  return request({
    url: '/addcontent',
    method: 'post',
    params:addplan
  })
}
// 删除计划
export function delPlan(id) {
  return request({
    url: '/delPlan',
    method: 'post',
    params:{
      planId:id
    }
  })
}
export function delOfficial(id) {
  return request({
    url: '/delOfficial',
    method: 'post',
    params:id
  })
}
// 修改计划
export function updateplan(planId,
  topic,
  host,
  startDate,
  endDate,
  details,) {
  return request({
    url: '/updateplan',
    method: 'post',
    params:{
      planId:planId,
      topic:topic,
      host:host,
      startDate:startDate,
      endDate:endDate,
      details:details,
    }
  })
}


